#include <iostream>
#include "client.h"
#include "server.h"
#include <memory>
#include "adapter.h"
int main(int argc, char *argv[])
{
    //半径为10的圆孔
    std::shared_ptr<RoundHole> hole= std::make_shared<RoundHole>(10);
    std::shared_ptr<SquarePeg> smallquarepeg = std::make_shared<SquarePeg>(5);
    std::shared_ptr<SquarePeg> largequarepeg = std::make_shared<SquarePeg>(10);


    std::shared_ptr<SquarePegAdapter> smallquarepegAdapter = std::make_shared<SquarePegAdapter>(smallquarepeg);
    std::shared_ptr<SquarePegAdapter> largequarepegAdapter = std::make_shared<SquarePegAdapter>(largequarepeg);
    if (hole->isFit(smallquarepegAdapter)){
         std::cout << "small square peg fits the hole" << std::endl;
    }else{
           std::cout << "small square peg don't fit the hole" << std::endl;
    }

    if (hole->isFit(largequarepegAdapter)){
          std::cout << "large square peg fits the hole" << std::endl;
    }else{
          std::cout << "large square peg don't fit the hole" << std::endl;
    }
    return 0;
}
